-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for rustc's -Z terminal-width
.
#8427
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this back up!
Also mentioned here there is some documentation to update.
I've also pushed a commit which adds the requested documentation. |
c67125c
to
d1185d0
Compare
☔ The latest upstream changes (presumably #8378) made this pull request unmergeable. Please resolve the merge conflicts. |
I could see third party tools working through cargo instead or rustc directly to use it to make output fit the users viewport, but I guess most tools will be using rustc directly. |
This commit adds support for rustc's `-Z terminal-width` flag, which is used to trim diagnostic output to fit within the current terminal. Co-authored-by: David Wood <david@davidtw.co> Signed-off-by: David Wood <david@davidtw.co>
This commit modifies the parsing of `-Z terminal-width` so that it can optionally take a value and only uses `accurate_err_width` when the user does not provide a value - therefore making the emission of `-Z terminal-width` opt-in. Signed-off-by: David Wood <david@davidtw.co>
This commit adds relevant documentation for the `-Z terminal-width` flag. Signed-off-by: David Wood <david@davidtw.co>
This commit introduces a `TtyWidth` enum which enables better handling of the tty-width on Windows. Signed-off-by: David Wood <david@davidtw.co>
Thanks! |
📌 Commit af924d4 has been approved by |
☀️ Test successful - checks-azure |
Update cargo 4 commits in 4f74d9b2a771c58b7ef4906b2668afd075bc8081..43cf77395cad5b79887b20b7cf19d418bbd703a9 2020-07-08 17:13:00 +0000 to 2020-07-13 17:35:42 +0000 - fix: add space to comments (rust-lang/cargo#8476) - Allow configuring unstable flags via config file (rust-lang/cargo#8393) - Add support for rustc's `-Z terminal-width`. (rust-lang/cargo#8427) - Avoid colliding with older Cargo fingerprint changes (rust-lang/cargo#8473)
This PR continues the work started in #7315, adding support for rustc's
-Z terminal-width
flag, which is used to trim diagnostic output to fit within the current terminal and was added in rust-lang/rust#63402 (with JSON emitter support in rust-lang/rust#73763).At the time of writing, rust-lang/rust#73763 isn't in nightly, so the test added in this PR will fail, but it should pass tomorrow (I've confirmed that it works with a local rustc build).
cc @estebank